3.2.23 \(\int \frac {\text {sech}^6(c+d x)}{(a+b \tanh ^2(c+d x))^2} \, dx\) [123]

3.2.23.1 Optimal result
3.2.23.2 Mathematica [A] (verified)
3.2.23.3 Rubi [A] (verified)
3.2.23.4 Maple [B] (verified)
3.2.23.5 Fricas [B] (verification not implemented)
3.2.23.6 Sympy [F]
3.2.23.7 Maxima [B] (verification not implemented)
3.2.23.8 Giac [F]
3.2.23.9 Mupad [F(-1)]

3.2.23.1 Optimal result

Integrand size = 23, antiderivative size = 97 \[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=-\frac {(3 a-b) (a+b) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} b^{5/2} d}+\frac {\tanh (c+d x)}{b^2 d}+\frac {(a+b)^2 \tanh (c+d x)}{2 a b^2 d \left (a+b \tanh ^2(c+d x)\right )} \]

output
-1/2*(3*a-b)*(a+b)*arctan(b^(1/2)*tanh(d*x+c)/a^(1/2))/a^(3/2)/b^(5/2)/d+t 
anh(d*x+c)/b^2/d+1/2*(a+b)^2*tanh(d*x+c)/a/b^2/d/(a+b*tanh(d*x+c)^2)
 
3.2.23.2 Mathematica [A] (verified)

Time = 1.39 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.05 \[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\frac {-\frac {(3 a-b) (a+b) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{a^{3/2}}+\frac {\sqrt {b} (a+b)^2 \sinh (2 (c+d x))}{a (a-b+(a+b) \cosh (2 (c+d x)))}+2 \sqrt {b} \tanh (c+d x)}{2 b^{5/2} d} \]

input
Integrate[Sech[c + d*x]^6/(a + b*Tanh[c + d*x]^2)^2,x]
 
output
(-(((3*a - b)*(a + b)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/a^(3/2)) + 
(Sqrt[b]*(a + b)^2*Sinh[2*(c + d*x)])/(a*(a - b + (a + b)*Cosh[2*(c + d*x) 
])) + 2*Sqrt[b]*Tanh[c + d*x])/(2*b^(5/2)*d)
 
3.2.23.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4158, 300, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sec (i c+i d x)^6}{\left (a-b \tan (i c+i d x)^2\right )^2}dx\)

\(\Big \downarrow \) 4158

\(\displaystyle \frac {\int \frac {\left (1-\tanh ^2(c+d x)\right )^2}{\left (b \tanh ^2(c+d x)+a\right )^2}d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 300

\(\displaystyle \frac {\int \left (\frac {1}{b^2}-\frac {a^2-b^2+2 b (a+b) \tanh ^2(c+d x)}{b^2 \left (b \tanh ^2(c+d x)+a\right )^2}\right )d\tanh (c+d x)}{d}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {-\frac {(3 a-b) (a+b) \arctan \left (\frac {\sqrt {b} \tanh (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} b^{5/2}}+\frac {(a+b)^2 \tanh (c+d x)}{2 a b^2 \left (a+b \tanh ^2(c+d x)\right )}+\frac {\tanh (c+d x)}{b^2}}{d}\)

input
Int[Sech[c + d*x]^6/(a + b*Tanh[c + d*x]^2)^2,x]
 
output
(-1/2*((3*a - b)*(a + b)*ArcTan[(Sqrt[b]*Tanh[c + d*x])/Sqrt[a]])/(a^(3/2) 
*b^(5/2)) + Tanh[c + d*x]/b^2 + ((a + b)^2*Tanh[c + d*x])/(2*a*b^2*(a + b* 
Tanh[c + d*x]^2)))/d
 

3.2.23.3.1 Defintions of rubi rules used

rule 300
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_), x_Symbol] :> Int 
[PolynomialDivide[(a + b*x^2)^p, (c + d*x^2)^(-q), x], x] /; FreeQ[{a, b, c 
, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] && ILtQ[q, 0] && GeQ[p, -q]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4158
Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_ 
)])^(n_))^(p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim 
p[ff/(c^(m - 1)*f)   Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)^n)^ 
p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && I 
ntegerQ[m/2] && (IntegersQ[n, p] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] 
 || EqQ[n^2, 16])
 
3.2.23.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(305\) vs. \(2(85)=170\).

Time = 258.30 (sec) , antiderivative size = 306, normalized size of antiderivative = 3.15

method result size
derivativedivides \(\frac {\frac {\frac {2 \left (\frac {\left (a^{2}+2 a b +b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 a}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}\right )}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a}+\left (3 a^{2}+2 a b -b^{2}\right ) \left (\frac {\left (a +\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (-a +\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{b^{2}}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}}{d}\) \(306\)
default \(\frac {\frac {\frac {2 \left (\frac {\left (a^{2}+2 a b +b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{2 a}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}\right )}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a +2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a +4 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b +a}+\left (3 a^{2}+2 a b -b^{2}\right ) \left (\frac {\left (a +\sqrt {\left (a +b \right ) b}+b \right ) \arctan \left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}+a +2 b \right ) a}}-\frac {\left (-a +\sqrt {\left (a +b \right ) b}-b \right ) \operatorname {arctanh}\left (\frac {a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{2 a \sqrt {\left (a +b \right ) b}\, \sqrt {\left (2 \sqrt {\left (a +b \right ) b}-a -2 b \right ) a}}\right )}{b^{2}}+\frac {2 \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+1\right )}}{d}\) \(306\)
risch \(-\frac {3 a^{2} {\mathrm e}^{4 d x +4 c}+2 a b \,{\mathrm e}^{4 d x +4 c}-{\mathrm e}^{4 d x +4 c} b^{2}+6 a^{2} {\mathrm e}^{2 d x +2 c}-2 a b \,{\mathrm e}^{2 d x +2 c}+3 a^{2}+4 a b +b^{2}}{a \,b^{2} d \left (a \,{\mathrm e}^{4 d x +4 c}+b \,{\mathrm e}^{4 d x +4 c}+2 \,{\mathrm e}^{2 d x +2 c} a -2 b \,{\mathrm e}^{2 d x +2 c}+a +b \right ) \left ({\mathrm e}^{2 d x +2 c}+1\right )}-\frac {3 a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d \,b^{2}}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{2 \sqrt {-a b}\, d b}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}+2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}+\frac {3 a \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d \,b^{2}}+\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{2 \sqrt {-a b}\, d b}-\frac {\ln \left ({\mathrm e}^{2 d x +2 c}+\frac {a \sqrt {-a b}-b \sqrt {-a b}-2 a b}{\left (a +b \right ) \sqrt {-a b}}\right )}{4 \sqrt {-a b}\, d a}\) \(514\)

input
int(sech(d*x+c)^6/(a+b*tanh(d*x+c)^2)^2,x,method=_RETURNVERBOSE)
 
output
1/d*(2/b^2*((1/2*(a^2+2*a*b+b^2)/a*tanh(1/2*d*x+1/2*c)^3+1/2*(a^2+2*a*b+b^ 
2)/a*tanh(1/2*d*x+1/2*c))/(tanh(1/2*d*x+1/2*c)^4*a+2*tanh(1/2*d*x+1/2*c)^2 
*a+4*tanh(1/2*d*x+1/2*c)^2*b+a)+1/2*(3*a^2+2*a*b-b^2)*(1/2*(a+((a+b)*b)^(1 
/2)+b)/a/((a+b)*b)^(1/2)/((2*((a+b)*b)^(1/2)+a+2*b)*a)^(1/2)*arctan(a*tanh 
(1/2*d*x+1/2*c)/((2*((a+b)*b)^(1/2)+a+2*b)*a)^(1/2))-1/2*(-a+((a+b)*b)^(1/ 
2)-b)/a/((a+b)*b)^(1/2)/((2*((a+b)*b)^(1/2)-a-2*b)*a)^(1/2)*arctanh(a*tanh 
(1/2*d*x+1/2*c)/((2*((a+b)*b)^(1/2)-a-2*b)*a)^(1/2))))+2/b^2*tanh(1/2*d*x+ 
1/2*c)/(tanh(1/2*d*x+1/2*c)^2+1))
 
3.2.23.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1282 vs. \(2 (85) = 170\).

Time = 0.31 (sec) , antiderivative size = 2869, normalized size of antiderivative = 29.58 \[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\text {Too large to display} \]

input
integrate(sech(d*x+c)^6/(a+b*tanh(d*x+c)^2)^2,x, algorithm="fricas")
 
output
[-1/4*(4*(3*a^3*b + 2*a^2*b^2 - a*b^3)*cosh(d*x + c)^4 + 16*(3*a^3*b + 2*a 
^2*b^2 - a*b^3)*cosh(d*x + c)*sinh(d*x + c)^3 + 4*(3*a^3*b + 2*a^2*b^2 - a 
*b^3)*sinh(d*x + c)^4 + 12*a^3*b + 16*a^2*b^2 + 4*a*b^3 + 8*(3*a^3*b - a^2 
*b^2)*cosh(d*x + c)^2 + 8*(3*a^3*b - a^2*b^2 + 3*(3*a^3*b + 2*a^2*b^2 - a* 
b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^2 - ((3*a^3 + 5*a^2*b + a*b^2 - b^3)*c 
osh(d*x + c)^6 + 6*(3*a^3 + 5*a^2*b + a*b^2 - b^3)*cosh(d*x + c)*sinh(d*x 
+ c)^5 + (3*a^3 + 5*a^2*b + a*b^2 - b^3)*sinh(d*x + c)^6 + (9*a^3 + 3*a^2* 
b - 5*a*b^2 + b^3)*cosh(d*x + c)^4 + (9*a^3 + 3*a^2*b - 5*a*b^2 + b^3 + 15 
*(3*a^3 + 5*a^2*b + a*b^2 - b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^4 + 4*(5*( 
3*a^3 + 5*a^2*b + a*b^2 - b^3)*cosh(d*x + c)^3 + (9*a^3 + 3*a^2*b - 5*a*b^ 
2 + b^3)*cosh(d*x + c))*sinh(d*x + c)^3 + 3*a^3 + 5*a^2*b + a*b^2 - b^3 + 
(9*a^3 + 3*a^2*b - 5*a*b^2 + b^3)*cosh(d*x + c)^2 + (15*(3*a^3 + 5*a^2*b + 
 a*b^2 - b^3)*cosh(d*x + c)^4 + 9*a^3 + 3*a^2*b - 5*a*b^2 + b^3 + 6*(9*a^3 
 + 3*a^2*b - 5*a*b^2 + b^3)*cosh(d*x + c)^2)*sinh(d*x + c)^2 + 2*(3*(3*a^3 
 + 5*a^2*b + a*b^2 - b^3)*cosh(d*x + c)^5 + 2*(9*a^3 + 3*a^2*b - 5*a*b^2 + 
 b^3)*cosh(d*x + c)^3 + (9*a^3 + 3*a^2*b - 5*a*b^2 + b^3)*cosh(d*x + c))*s 
inh(d*x + c))*sqrt(-a*b)*log(((a^2 + 2*a*b + b^2)*cosh(d*x + c)^4 + 4*(a^2 
 + 2*a*b + b^2)*cosh(d*x + c)*sinh(d*x + c)^3 + (a^2 + 2*a*b + b^2)*sinh(d 
*x + c)^4 + 2*(a^2 - b^2)*cosh(d*x + c)^2 + 2*(3*(a^2 + 2*a*b + b^2)*cosh( 
d*x + c)^2 + a^2 - b^2)*sinh(d*x + c)^2 + a^2 - 6*a*b + b^2 + 4*((a^2 +...
 
3.2.23.6 Sympy [F]

\[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int \frac {\operatorname {sech}^{6}{\left (c + d x \right )}}{\left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2}}\, dx \]

input
integrate(sech(d*x+c)**6/(a+b*tanh(d*x+c)**2)**2,x)
 
output
Integral(sech(c + d*x)**6/(a + b*tanh(c + d*x)**2)**2, x)
 
3.2.23.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 209 vs. \(2 (85) = 170\).

Time = 0.39 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.15 \[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\frac {3 \, a^{2} + 4 \, a b + b^{2} + 2 \, {\left (3 \, a^{2} - a b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (3 \, a^{2} + 2 \, a b - b^{2}\right )} e^{\left (-4 \, d x - 4 \, c\right )}}{{\left (a^{2} b^{2} + a b^{3} + {\left (3 \, a^{2} b^{2} - a b^{3}\right )} e^{\left (-2 \, d x - 2 \, c\right )} + {\left (3 \, a^{2} b^{2} - a b^{3}\right )} e^{\left (-4 \, d x - 4 \, c\right )} + {\left (a^{2} b^{2} + a b^{3}\right )} e^{\left (-6 \, d x - 6 \, c\right )}\right )} d} + \frac {{\left (3 \, a^{2} + 2 \, a b - b^{2}\right )} \arctan \left (\frac {{\left (a + b\right )} e^{\left (-2 \, d x - 2 \, c\right )} + a - b}{2 \, \sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{2} d} \]

input
integrate(sech(d*x+c)^6/(a+b*tanh(d*x+c)^2)^2,x, algorithm="maxima")
 
output
(3*a^2 + 4*a*b + b^2 + 2*(3*a^2 - a*b)*e^(-2*d*x - 2*c) + (3*a^2 + 2*a*b - 
 b^2)*e^(-4*d*x - 4*c))/((a^2*b^2 + a*b^3 + (3*a^2*b^2 - a*b^3)*e^(-2*d*x 
- 2*c) + (3*a^2*b^2 - a*b^3)*e^(-4*d*x - 4*c) + (a^2*b^2 + a*b^3)*e^(-6*d* 
x - 6*c))*d) + 1/2*(3*a^2 + 2*a*b - b^2)*arctan(1/2*((a + b)*e^(-2*d*x - 2 
*c) + a - b)/sqrt(a*b))/(sqrt(a*b)*a*b^2*d)
 
3.2.23.8 Giac [F]

\[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int { \frac {\operatorname {sech}\left (d x + c\right )^{6}}{{\left (b \tanh \left (d x + c\right )^{2} + a\right )}^{2}} \,d x } \]

input
integrate(sech(d*x+c)^6/(a+b*tanh(d*x+c)^2)^2,x, algorithm="giac")
 
output
sage0*x
 
3.2.23.9 Mupad [F(-1)]

Timed out. \[ \int \frac {\text {sech}^6(c+d x)}{\left (a+b \tanh ^2(c+d x)\right )^2} \, dx=\int \frac {1}{{\mathrm {cosh}\left (c+d\,x\right )}^6\,{\left (b\,{\mathrm {tanh}\left (c+d\,x\right )}^2+a\right )}^2} \,d x \]

input
int(1/(cosh(c + d*x)^6*(a + b*tanh(c + d*x)^2)^2),x)
 
output
int(1/(cosh(c + d*x)^6*(a + b*tanh(c + d*x)^2)^2), x)